package com.example.pucha_xian.Adapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;

import com.example.pucha_xian.R;
import com.example.pucha_xian.common.PointVO;

import java.util.List;

public class BackPointsAdapter extends ArrayAdapter {

    public BackPointsAdapter(Context context, int resource, List<PointVO> pointVOS) {
        super(context, resource,pointVOS);
    }


    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        PointVO pointVO= (PointVO) getItem(position);
        View view= LayoutInflater.from(getContext()).inflate(R.layout.listview_item_backpoints,null);
        TextView name=view.findViewById(R.id.tv_item_name);
        name.setText(pointVO.getName());
        TextView pointid=view.findViewById(R.id.tv_item_pointid);
        pointid.setText(pointVO.getPointID());
        TextView status=view.findViewById(R.id.tv_item_status);
        status.setText(pointVO.getStatus());
        TextView shr=view.findViewById(R.id.tv_item_shr);
        shr.setText(pointVO.getShr());

        return view;
    }



}
